<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <title>栏目管理</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" type="text/css" href="__ADMIN__/layui/css/layui.css" media="all">
  <link rel="stylesheet" type="text/css" href="__ADMIN__/bootstrap/css/bootstrap.css" media="all">
  <link rel="stylesheet" type="text/css" href="__ADMIN__/global.css" media="all">
  <link rel="stylesheet" type="text/css" href="__ADMIN__/css/personal.css" media="all">
  <script type="text/javascript" src="__ADMIN__/jedate/jquery-1.7.2.js"></script>
</head>
<body>
<blockquote class="layui-elem-quote mylog-info-tit">
  <ul class="layui-tab-title">
    <a href="/admin/category"><li class="layui-btn"><i class="layui-icon"></i>返回栏目列表</li></a>
  </ul>
</blockquote>
<form class="layui-form" action="/admin/category/edit" method="post">   
<div class="layui-tab layui-tab-card">
  <ul class="layui-tab-title">
    <li class="layui-this">基本设置</li>
    <li>SEO配置</li>
    <li id="cof">模板配置</li>
  </ul>
  <div class="layui-tab-content">
    <div class="layui-tab-item layui-show">
      <!-- 基本设置 -->
      <table class="layui-table">
        <colgroup>
          <col width="150">
          <col>
        </colgroup>
        <tbody>
         <if condition="$info['cate_type'] eq 1" >
          <tr>
            <td><label>所属模型</label></td>
            <td>
              <div class="layui-input-inline">
                 <select lay-filter="test" name="modelid">
                   <volist name="model" id="vo">
                   <option value="{$vo.modelid}" <if condition="$info['modelid'] eq $vo['modelid']" > selected </if> >{$vo.name}</option>
                   </volist>
                 </select>
             </div>
            </td>
          </tr>
          </if>
           <tr>
            <td><label>所属栏目</label></td>
            <td>
              <div class="layui-input-inline">
                 <select lay-filter="test" name="parentid">
                   <option value="0">作为一级栏目</option>
                   <volist name="category" id="vo">
                   <option value="{$vo.cateid}" <if condition="$info['parentid'] eq $vo['cateid']" > selected </if> />{$vo.catename}</option>
                   </volist>
                 </select>
             </div>
            </td>
          </tr>
          <tr>
            <td>
              <label>栏目名称</label>
              <br>
              填写栏目名称
            </td>
            <td>
              <div class="layui-input-inline" style="width: 250px;">
                  <input name="catename" autocomplete="off" value="{$info.catename}" class="layui-input" type="text">
                  <input name="name" autocomplete="off" value="{$info.catename}" class="layui-input" type="hidden">
                  <input name="cateid" autocomplete="off" value="{$info.cateid}" class="layui-input" type="hidden">
              </div>
            </td>
          </tr>
          <tr>
            <td>
              <label>目录名</label>
            </td>
            <td>
              <div class="layui-input-inline" style="width: 250px;">
                  <input name="pathname" autocomplete="off" value="{$info.pathname}" class="layui-input" type="text">
                   <input name="path" autocomplete="off" value="{$info.pathname}" class="layui-input" type="hidden">
              </div>
            </td>
          </tr>
           <tr>
            <td>
              <label>栏目描述</label>
            </td>
            <td>
              <div class="layui-input-inline" style="width: 250px;">
                  <input name="description" autocomplete="off" value="{$info.description}" class="layui-input" type="text">
              </div>
            </td>
          </tr>

          <tr>
            <td><label>是否在导航显示</label></td>
            <td>
              <div class="layui-input-inline">
                <input name="is_nav" value="1" title="是" type="radio" <if condition="$info['is_nav'] eq 1" > checked </if> />
                <input name="is_nav" value="0" title="否" type="radio" <if condition="$info['is_nav'] eq 0" > checked </if> />
              </div>
            </td>
          </tr>
           
          <tr>
            <td><label>是否为终极栏目 </label></td>
            <td>
              <div class="layui-input-inline">
                <input name="is_final" value="1" title="是" type="radio" <if condition="$info['is_final'] eq 1" > checked </if> />
                <input name="is_final" value="0" title="否" type="radio" <if condition="$info['is_final'] eq 0" > checked </if> />
              </div>
            </td>
          </tr>
          <if condition="$info['cate_type'] eq 1">
          <tr>
            <td><label>是否外部链接</label></td>
            <td>
              <div class="layui-input-inline">
               <span id="is_url"><input name="is_outer" value="1" title="是" type="radio" <if condition="$info['is_outer'] eq 1" > checked </if> /></span>
               <span id="no_url"><input name="is_outer" value="0" title="否" type="radio" <if condition="$info['is_outer'] eq 0" > checked </if> /></span>
              </div>
            </td>
          </tr>
          <tr id="cate_url" style="display:none">
            <td>
               <label>指定栏目地址(外部)</label>
               <br>
               指定地址后，栏目的url就变成此项的值
            </td>
            <td>
              <div class="layui-input-inline" style="width: 250px;">
                  <input name="cate_url" id="no" autocomplete="off" class="layui-input" type="text">
              </div>
            </td>
          </tr>
          <else />
            <tr id="cate_ur">
            <td>
               <label>指定栏目地址</label>
               <br>
               指定地址后，栏目的url就变成此项的值
            </td>
            <td>
              <div class="layui-input-inline" style="width: 250px;">
                  <input name="cate_url" value="{$info.cate_url}" autocomplete="off" class="layui-input" type="text">
              </div>
            </td>
          </tr>
          </if>
          <tr>
            <td>
              <label>分页显示</label>
            </td>
            <td>
              <div class="layui-input-inline" style="width: 250px;">
                  <input name="pagesize" value="{$info.pagesize}" autocomplete="off" class="layui-input" type="text">
              </div>
            </td>
          </tr>
          <tr>
            <td>
              <label>排序</label>
            </td>
            <td>
              <div class="layui-input-inline" style="width: 250px;">
                  <input name="sort" value="{$info.sort}" autocomplete="off" class="layui-input" type="text">
              </div>
            </td>
          </tr>
         
        </tbody>
      </table>
      <div class="layui-form-item">
        <div class="layui-input-block">
          <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
        </div>
      </div>
    </div>
    <div class="layui-tab-item">
      <!-- SEO配置 -->
       <table class="layui-table">
        <colgroup>
          <col width="180">
          <col>
        </colgroup>
        <tbody>
          <tr>
            <td>
              <label>SEO栏目标题</label>
            </td>
            <td>
              <div class="layui-input-inline" style="width: 250px;">
                  <input name="seo_title" value="{$info.seo_title}" autocomplete="off" class="layui-input" type="text">
              </div>
            </td>
          </tr>
          <tr>
            <td>
              <label>SEO栏目关键字</label>
            </td>
            <td>
              <div class="layui-input-inline" style="width: 250px;">
                  <input name="seo_keywords" value="{$info.seo_keywords}" autocomplete="off" class="layui-input" type="text">
              </div>
            </td>
          </tr>
          <tr>
            <td>
              <label>SEO栏目描述</label>
            </td>
            <td>
              <div class="layui-input-inline" style="width: 250px;">
                  <input name="seo_description" value="{$info.seo_description}" autocomplete="off" class="layui-input" type="text">
              </div>
            </td>
          </tr>
          <tr>
            <td>
              <label>手机版SEO栏目标题</label>
            </td>
            <td>
              <div class="layui-input-inline" style="width: 250px;">
                  <input name="m_seo_title" value="{$info.m_seo_title}" autocomplete="off" class="layui-input" type="text">
              </div>
            </td>
          </tr>
          <tr>
            <td>
              <label>手机版SEO栏目关键字</label>
            </td>
            <td>
              <div class="layui-input-inline" style="width: 250px;">
                  <input name="m_seo_keywords" value="{$info.m_seo_keywords}" autocomplete="off" class="layui-input" type="text">
              </div>
            </td>
          </tr>
          <tr>
            <td>
              <label>手机版SEO栏目描述</label>
            </td>
            <td>
              <div class="layui-input-inline" style="width: 250px;">
                  <input name="m_seo_description" value="{$info.m_seo_description}" autocomplete="off" class="layui-input" type="text">
              </div>
            </td>
          </tr>
        </tbody>
      </table>
      <div class="layui-form-item">
        <div class="layui-input-block">
          <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
        </div>
      </div>
    </div>
    <div class="layui-tab-item" id="see_height">
      <!-- 模板配置 -->
       <table class="layui-table">
        <colgroup>
          <col width="150">
          <col>
        </colgroup>
        <tbody>
          <if condition="$info['cate_type'] eq 1">
           <tr>
            <td><label>栏目模板</label></td>
            <td>
              <div class="layui-input-inline" style="width:500px;">
                 <select lay-filter="test" name="category_template">
                  <if condition="$index_tpl">
                  <volist name="index_tpl" id="list">
                   <option <if condition="$info['category_template'] eq $list" > selected </if> />{$list}</option>
                   </volist>
                   <else />
                  <option value="">请选择</option>
                  </if>
                 </select>
             </div>
            </td>
          </tr>
          <tr>
            <td><label>列表模板</label></td>
            <td>
              <div class="layui-input-inline" style="width:500px;">
                 <select lay-filter="test" name="list_template">
                  <if condition="$list_tpl">
                   <volist name="list_tpl" id="list">
                    <option <if condition="$info['list_template'] eq $list" > selected </if> />{$list}</option>
                   </volist>
                   <else />
                  <option value="">请选择</option>
                  </if>
                 </select>
             </div>
            </td>
          </tr>
           <tr>
            <td><label>内容模板</label></td>
            <td>
              <div class="layui-input-inline" style="width:500px;">
                 <select lay-filter="test" name="show_template">
                  <if condition="$show_tpl">
                   <volist name="show_tpl" id="list">
                   <option <if condition="$info['show_template'] eq $list" > selected </if> />{$list}</option>
                   </volist>
                   <else />
                  <option value="">请选择</option>
                  </if>
                 </select>
             </div>
            </td>
          </tr>
          <else />
            <tr>
            <td><label>内容模板</label></td>
            <td>
              <div class="layui-input-inline" style="width:500px;">
                 <select lay-filter="test" name="show_template">
                   <if condition="$page_tpl">
                   <volist name="page_tpl" id="list">
                   <option <if condition="$info['show_template'] eq $list" > selected </if> />{$list}</option>
                   </volist>
                   <else />
                  <option value="">请选择</option>
                  </if>
                 </select>
             </div>
            </td>
          </tr>
          </if>
        </tbody>
      </table>
      <div class="layui-form-item">
        <div class="layui-input-block">
          <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
        </div>
      </div>
    </div>
  </div>
</div></form>    

<script src="__ADMIN__/layui/layui.js" charset="utf-8"></script>
<script>
layui.use('element', function(){
  var $ = layui.jquery
  ,element = layui.element(); //Tab的切换功能，切换事件监听等，需要依赖element模块
});
layui.use('form', function(){
  var form = layui.form();
  });
$("#cof").click(function(){
  a=$(window).height();
  $("#see_height").css("height",a);
});
//外部链接显示 
$("#is_url").click(function(){
   $("#cate_url").css("display","");
});
$("#no_url").click(function(){
   $("#cate_url").css("display","none");
});
//外部链接显示 
$("#is_ur").click(function(){
   $("#cate_ur").css("display","");
});
$("#no_ur").click(function(){
   $("#cate_ur").css("display","none");
});
</script>
</body>
</html>